package com.wicket.okrfinance.integration.dto;

import com.wicket.okrfinance.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc FinanceAccountDto
 * @使用场景
 */
@Data
public class FinanceAccountDto extends BaseDto implements Serializable {

  /**
   * 账户ID
   */
  @ApiModelProperty("账户ID")
  private String accountId;

  /**
   * 账户标识
   */
  @ApiModelProperty("账户标识")
  private String accountCode;

  /**
   * 账户卡号
   */
  @ApiModelProperty("账户卡号")
  private String accountCardNumber;

  /**
   * 上级账户归属主体标识
   */
  @ApiModelProperty("上级账户归属主体标识")
  private String parentAccountContentCode;

  /**
   * 账户余额
   */
  @ApiModelProperty("账户余额")
  private Double accountActualBalance;

  /**
   * 可用金额
   */
  @ApiModelProperty("可用金额")
  private Double settlableBalance;

  /**
   * 冻结金额
   */
  @ApiModelProperty("冻结金额")
  private Double unSettlableBalance;

  /**
   * 累计结算金额
   */
  @ApiModelProperty("累计结算金额")
  private Double accruedSettledAmount;

  /**
   * 总金额
   */
  @ApiModelProperty("总金额")
  private Double totalBudgetAmount;

  /**
   * 账户状态 LOCK:锁定 NORMAL:正常
   */
  @ApiModelProperty("账户状态")
  private String accountStatus;

  /**
   * 是否结束状态 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否结束状态")
  private String isEndStatus;

  /**
   * 认证状态 UNCERTIFICATED:未认证 AUTHENTICATED:已认证 AUTHENTICATION_FAILURE:认证失败
   */
  @ApiModelProperty("认证状态")
  private String certificationStatus;

  /**
   * 账户类型 POOL_ACCOUNT:发行账户 ECOLOGICAL_ACCOUNT:生态账户
   */
  @ApiModelProperty("账户类型")
  private String accountTypeCode;

  /**
   * 是否预算账户 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否预算账户")
  private String isBudgetAccount;

  /**
   * 生态账户类型编码 ORG_POOL_ACCOUNT:组织发行账户 TARGET_CONTENT_ACCOUNT:目标内容账户
   */
  @ApiModelProperty("生态账户类型编码")
  private String ecologicalAccountTypeCode;

  /**
   * 账户关联主体分类类型 CONTENT_TYPE:内容分类 ORGANIZATIONAL_STRUCTURE_TYPE:组织架构分类
   */
  @ApiModelProperty("账户关联主体分类类型")
  private String accountObjectClass;

  /**
   * 关联归属主体ID
   */
  @ApiModelProperty("关联归属主体ID")
  private String accountObjectId;

  /**
   * 关联归属主体类型编码 TARGET:目标 TARGET_CATEGORY:目标分类 OBJECTIVE:指标 DEPT:部门
   */
  @ApiModelProperty("关联归属主体类型编码")
  private String accountObjectTypeCode;

  /**
   * 关联归属主体标识
   */
  @ApiModelProperty("关联归属主体标识")
  private String accountContentCode;

  /**
   * 发行体系类型编码 CAPITAL_SYSTEM:资金体系 INTEGRAL_SYSTEM:积分体系
   */
  @ApiModelProperty("发行体系类型编码")
  private String distributionSystemTypeCode;

  /**
   * 是否组织正式财务标准 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否组织正式财务标准")
  private String isOrgOfficialAccountNom;

  /**
   * 是否到账账户 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否到账账户")
  private String isIncomingAccount;

  /**
   * 是否统计账户 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否统计账户")
  private String isStatisticalAccount;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    FinanceAccountDto that = (FinanceAccountDto) o;
    return (
      accountId == that.accountId &&
      accountCode == that.accountCode &&
      accountCardNumber == that.accountCardNumber &&
      parentAccountContentCode == that.parentAccountContentCode &&
      accountActualBalance == that.accountActualBalance &&
      settlableBalance == that.settlableBalance &&
      unSettlableBalance == that.unSettlableBalance &&
      accruedSettledAmount == that.accruedSettledAmount &&
      totalBudgetAmount == that.totalBudgetAmount &&
      accountStatus == that.accountStatus &&
      isEndStatus == that.isEndStatus &&
      certificationStatus == that.certificationStatus &&
      accountTypeCode == that.accountTypeCode &&
      isBudgetAccount == that.isBudgetAccount &&
      ecologicalAccountTypeCode == that.ecologicalAccountTypeCode &&
      accountObjectClass == that.accountObjectClass &&
      accountObjectId == that.accountObjectId &&
      accountObjectTypeCode == that.accountObjectTypeCode &&
      accountContentCode == that.accountContentCode &&
      distributionSystemTypeCode == that.distributionSystemTypeCode &&
      isOrgOfficialAccountNom == that.isOrgOfficialAccountNom &&
      isIncomingAccount == that.isIncomingAccount &&
      isStatisticalAccount == that.isStatisticalAccount
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      accountId,
      accountCode,
      accountCardNumber,
      parentAccountContentCode,
      accountActualBalance,
      settlableBalance,
      unSettlableBalance,
      accruedSettledAmount,
      totalBudgetAmount,
      accountStatus,
      isEndStatus,
      certificationStatus,
      accountTypeCode,
      isBudgetAccount,
      ecologicalAccountTypeCode,
      accountObjectClass,
      accountObjectId,
      accountObjectTypeCode,
      accountContentCode,
      distributionSystemTypeCode,
      isOrgOfficialAccountNom,
      isIncomingAccount,
      isStatisticalAccount
    );
  }

}
